package lamnhungoc.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "sach")
public class Sach {
	@Id
	@Column(name = "MaSach")
	private String maSach;
	@Column(name = "TenSach")
	private String tenSach;
	@Column(name = "TacGia")
	private String tacGia;
	@Column(name = "GiaBan")
	private double giaBan;
	@Column(name = "SoLuong")
	private int soLuong;
	@Column(name = "MaDanhMuc")
	private String maDanhMuc;
	@Column(name = "HinhAnh")
	private String hinhAnh;

	public Sach() {

	}

	public Sach(String maSach, String tenSach, String tacGia, double giaBan, int soLuong, String maDanhMuc, String hinhAnh) {
		this.maSach = maSach;
		this.tenSach = tenSach;
		this.tacGia = tacGia;
		this.giaBan = giaBan;
		this.soLuong = soLuong;
		this.maDanhMuc = maDanhMuc;
		this.hinhAnh = hinhAnh;
	}

	public Sach(Sach sach) {
		this.maSach = sach.maSach;
		this.tenSach = sach.tenSach;
		this.tacGia = sach.tacGia;
		this.giaBan = sach.giaBan;
		this.soLuong = sach.soLuong;
		this.maDanhMuc = sach.maDanhMuc;
		this.hinhAnh = sach.hinhAnh;
	}

	public String getMaSach() {
		return maSach;
	}

	public void setMaSach(String maSach) {
		this.maSach = maSach;
	}

	public String getTenSach() {
		return tenSach;
	}

	public void setTenSach(String tenSach) {
		this.tenSach = tenSach;
	}

	public String getTacGia() {
		return tacGia;
	}

	public void setTacGia(String tacGia) {
		this.tacGia = tacGia;
	}

	public double getGiaBan() {
		return giaBan;
	}

	public void setGiaBan(double giaBan) {
		this.giaBan = giaBan;
	}

	public int getSoLuong() {
		return soLuong;
	}

	public void setSoLuong(int soLuong) {
		this.soLuong = soLuong;
	}

	public String getMaDanhMuc() {
		return maDanhMuc;
	}

	public void setMaDanhMuc(String maDanhMuc) {
		this.maDanhMuc = maDanhMuc;
	}

	public String getHinhAnh() {
		return hinhAnh;
	}

	public void setHinhAnh(String hinhAnh) {
		this.hinhAnh = hinhAnh;
	}
}
